import request from '@/utils/request'

// 查询期货账户列表
export function listFutureAccount(query) {
  return request({
    url: '/kylin/futureAccount/list',
    method: 'get',
    params: query
  })
}

// 查询期货账户详情
export function getFutureAccount(id) {
  return request({
    url: '/kylin/futureAccount/' + id,
    method: 'get'
  })
}

// 新增期货账户
export function addFutureAccount(data) {
  return request({
    url: '/kylin/futureAccount',
    method: 'post',
    data: data
  })
}

// 修改期货账户
export function updateFutureAccount(data) {
  return request({
    url: '/kylin/futureAccount',
    method: 'put',
    data: data
  })
}

// 删除期货账户
export function delFutureAccount(data) {
  return request({
    url: '/kylin/futureAccount',
    method: 'delete',
    data: data
  })
}

// 导出期货账户
export function exportFutureAccount(query) {
  return request({
    url: '/kylin/futureAccount/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获取所有期货账户（不分页）
export function getAllFutureAccounts() {
  return request({
    url: '/kylin/futureAccount/all/accounts',
    method: 'get'
  })
}